import json

def Creat_data():
    APIKey = input("API Key:") #获取APIKey
    SecretKey = input("SecretKey:") #获取SecretKey

    data = {
            "APIKey" : APIKey,
            "SecretKey" : SecretKey
        }

    #将key写入文件:
    with open(files,'w') as f:
        key_data = json.dump(data,f)

def Read_data():
    global APIKey
    global SecretKey

    with open(files,'r') as keys_file: #打开文件
        key_dic = json.load(keys_file) #读取字典

    APIKey = key_dic.get('APIKey')
    SecretKey = key_dic.get('SecretKey')